import request from '@/utils/request'

// 列表查询
const tableList = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/findList',
    method: 'post',
    data: params
  })
}

// 新增
const addData = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/add',
    method: 'post',
    data: params
  })
}

// 修改
const editData = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/update',
    method: 'post',
    data: params
  })
}

// 删除
const delData = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/delete',
    method: 'post',
    data: params
  })
}

// 审核
const auditHandle = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/Review',
    method: 'post',
    data: params
  })
}

// 电子证照列表 选择用
const ecNumList = function (params = {}) {
  return request({
    url: '/zy-api/api/ecMaininfo/getEcNumRel',
    method: 'post',
    data: params
  })
}

// 关联电子证照编号
const relationEcNum = function (params = {}) {
  return request({
    url: '/zy-api/api/wmFacilities/addEcNumRel',
    method: 'post',
    data: params
  })
}

// 获取电子证照信息
const elicenseInfo = function (params = {}) {
  return request({
    url: '/zy-api/api/elicense/getInfo',
    method: 'post',
    data: params
  })
}

export {
  tableList,
  addData,
  editData,
  delData,
  auditHandle,
  ecNumList,
  relationEcNum,
  elicenseInfo
}